/*
* @Author: jack
* @Date:   2022-01-16 19:29:44
* @Last Modified by:   jack
* @Last Modified time: 2022-01-17 21:33:50
*/
export function formatDate() {
      let date = new Date();
      let year = date.getFullYear(); // 年
      let month = date.getMonth() + 1; // 月
      let day = date.getDate(); // 日
      let week = date.getDay(); // 星期
      let weekArr = [ "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" ];
      let hour = date.getHours(); // 时
      hour = hour < 10 ? "0" + hour : hour; // 如果只有一位，则前面补零
      let minute = date.getMinutes(); // 分
      minute = minute < 10 ? "0" + minute : minute; // 如果只有一位，则前面补零
      let second = date.getSeconds(); // 秒
      second = second < 10 ? "0" + second : second; // 如果只有一位，则前面补零
      return `${year}年${month}月${day}日 ${hour}:${minute}:${second} ${weekArr[week]}`;
}

export function getValueFromList(list, field){
	var arr = []
	for (var i in list) {
		arr[i] = list[i][field]
	}
	return arr
}